﻿<Window x:Class="ScrumFactory.ProjectsList.CreateProject"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:props="clr-namespace:ScrumFactory.ProjectsList.Properties"        
        xmlns:SF_Validation="clr-namespace:ScrumFactory.Windows.Helpers.ValidationRules;assembly=ScrumFactory.Windows.Helpers"
        SnapsToDevicePixels="True"
        Style="{StaticResource FactoryWindow}"
        Title="{Binding PanelName}"
        WindowStartupLocation="CenterOwner"
        ShowInTaskbar="False"
        ResizeMode="NoResize"
        SizeToContent="Height"
        Width="500">    
    
    <Grid>        
        <Grid.ColumnDefinitions>       
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>            
        </Grid.RowDefinitions>
       
        
        
        <TextBlock                          
            Grid.Column="0" Grid.Row="0"                                    
            Text="{x:Static props:Resources.Project_name}"
            Style="{StaticResource LabelTextBlock}"/>
        <TextBox                          
            Grid.Column="1" Grid.Row="0"  
            Text="{Binding ProjectName, UpdateSourceTrigger=PropertyChanged}"            
            HorizontalAlignment="Stretch"/>            

        <TextBlock                          
            Grid.Column="0" Grid.Row="1"                                    
            Text="{x:Static props:Resources.Customer}"
            Style="{StaticResource LabelTextBlock}"/>
        <TextBox                          
            Grid.Column="1" Grid.Row="1"                        
            Text="{Binding ClientName, UpdateSourceTrigger=PropertyChanged}"
            HorizontalAlignment="Stretch"/>

        <TextBlock                          
            Grid.Column="0" Grid.Row="2"           
            Style="{StaticResource LabelTextBlock}"            
            Text="{x:Static props:Resources.Project_abstract}"
            VerticalAlignment="Top"/>
        <TextBox                          
            Grid.Column="1" Grid.Row="2"                                    
            Height="80"
            AcceptsReturn="True" TextWrapping="Wrap"
            Text="{Binding Description, UpdateSourceTrigger=PropertyChanged}"
            HorizontalAlignment="Stretch"/>            
            
            <Border Grid.ColumnSpan="2" Grid.Row="3"
                        Background="{StaticResource WindowButtonBar}"                        
                        HorizontalAlignment="Stretch" Margin="0,10,0,0">
                <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
                    <Button
                        Command="{Binding CreateProjectCommand}"
                        HorizontalAlignment="Center"
                        Content="{x:Static props:Resources.Create}"
                        Width="100"
                        Margin="10,5,10,5"/>
                    <Button
                        Command="{Binding CancelCommand}"
                        HorizontalAlignment="Center"
                        Width="100"
                        Content="{x:Static props:Resources.Cancel}"
                        Margin="10,5,10,5"/>

                </StackPanel>

            
            </Border>            
        
        

    </Grid>
</Window>
